package com.dbdata.move.model;

// Generated cafuc by Hibernate Tools 4

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * AirplaneNumber generated by hbm2java
 */
@Entity
@Table(name = "airplane_number")
public class AirplaneNumber implements java.io.Serializable {

	private Long id;
	private AirplaneModel airplaneModel;
	private Organize organize;
	private FlyBase flyBase;
	private String planeNumber;
	private Byte planeType;
	private Boolean status;
	private Date createTime;
	private Date operateTime;
	private String remark;
	private Set<TaskDoc> taskDocs = new HashSet<TaskDoc>(0);
	private Set<AirplaneMaintain> airplaneMaintains = new HashSet<AirplaneMaintain>(
			0);
	private Set<SimulatorTaskDoc> simulatorTaskDocs = new HashSet<SimulatorTaskDoc>(
			0);

	public AirplaneNumber() {
	}

	public AirplaneNumber(AirplaneModel airplaneModel, String planeNumber,
			Date createTime) {
		this.airplaneModel = airplaneModel;
		this.planeNumber = planeNumber;
		this.createTime = createTime;
	}

	public AirplaneNumber(AirplaneModel airplaneModel, Organize organize,
			FlyBase flyBase, String planeNumber, Byte planeType,
			Boolean status, Date createTime, Date operateTime, String remark,
			Set<TaskDoc> taskDocs, Set<AirplaneMaintain> airplaneMaintains,
			Set<SimulatorTaskDoc> simulatorTaskDocs) {
		this.airplaneModel = airplaneModel;
		this.organize = organize;
		this.flyBase = flyBase;
		this.planeNumber = planeNumber;
		this.planeType = planeType;
		this.status = status;
		this.createTime = createTime;
		this.operateTime = operateTime;
		this.remark = remark;
		this.taskDocs = taskDocs;
		this.airplaneMaintains = airplaneMaintains;
		this.simulatorTaskDocs = simulatorTaskDocs;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PLANE_MODEL_ID", nullable = false)
	public AirplaneModel getAirplaneModel() {
		return this.airplaneModel;
	}

	public void setAirplaneModel(AirplaneModel airplaneModel) {
		this.airplaneModel = airplaneModel;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ORGANIZE_ID")
	public Organize getOrganize() {
		return this.organize;
	}

	public void setOrganize(Organize organize) {
		this.organize = organize;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "BASE_ID")
	public FlyBase getFlyBase() {
		return this.flyBase;
	}

	public void setFlyBase(FlyBase flyBase) {
		this.flyBase = flyBase;
	}

	@Column(name = "PLANE_NUMBER", nullable = false, length = 20)
	public String getPlaneNumber() {
		return this.planeNumber;
	}

	public void setPlaneNumber(String planeNumber) {
		this.planeNumber = planeNumber;
	}

	@Column(name = "PLANE_TYPE")
	public Byte getPlaneType() {
		return this.planeType;
	}

	public void setPlaneType(Byte planeType) {
		this.planeType = planeType;
	}

	@Column(name = "STATUS")
	public Boolean getStatus() {
		return this.status;
	}

	public void setStatus(Boolean status) {
		this.status = status;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_TIME", nullable = false, length = 19)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "OPERATE_TIME", length = 19)
	public Date getOperateTime() {
		return this.operateTime;
	}

	public void setOperateTime(Date operateTime) {
		this.operateTime = operateTime;
	}

	@Column(name = "REMARK", length = 200)
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "airplaneNumber")
	public Set<TaskDoc> getTaskDocs() {
		return this.taskDocs;
	}

	public void setTaskDocs(Set<TaskDoc> taskDocs) {
		this.taskDocs = taskDocs;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "airplaneNumber")
	public Set<AirplaneMaintain> getAirplaneMaintains() {
		return this.airplaneMaintains;
	}

	public void setAirplaneMaintains(Set<AirplaneMaintain> airplaneMaintains) {
		this.airplaneMaintains = airplaneMaintains;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "airplaneNumber")
	public Set<SimulatorTaskDoc> getSimulatorTaskDocs() {
		return this.simulatorTaskDocs;
	}

	public void setSimulatorTaskDocs(Set<SimulatorTaskDoc> simulatorTaskDocs) {
		this.simulatorTaskDocs = simulatorTaskDocs;
	}

}
